home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
msqc25t1
/
saverest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-25
|
1KB
|
53 lines
/* saverest.c: Save and restore screen in LIFO order */
#include <conio.h>
#include <graph.h>
#include "textscrn.h"
main()
{
_clearscreen (_GCLEARSCREEN);
_outtext ("This is screen 1");
_outtext ("\nPress any key");
getch();
_savescrn (0);
/* Make and save screen 2 */
_setbkcolor (GREEN);
_settextcolor (WHITE);
_clearscreen (_GCLEARSCREEN);
_settextposition (11, 32); _outtext ("This is screen 2");
_settextposition (13, 33); _outtext ("Press any key");
getch();
_savescrn (0);
/* Make and save screen 3 */
_setbkcolor (MAGENTA);
_settextcolor (CYAN);
_clearscreen (_GCLEARSCREEN);
_settextposition (11, 32); _outtext ("This is screen 3");
_settextposition (13, 33); _outtext ("Press any key");
getch();
_savescrn (0);
/* Restore screen 3 */
_settextposition (15, 31); _outtext ("Saved: press again");
getch();
_restscrn (0);
/* Restore screen 2 */
getch();
_restscrn (0);
/* Restore screen 1 */
getch();
_restscrn (0);
/* Restore screen defaults and quit */
getch();
_setbkcolor (BLACK);
_settextcolor (LTGRAY);
_clearscreen (_GCLEARSCREEN);
}